Ti.include('background.js');
Ti.include('usergroup_tabs.js');

var constants = {
	serviceBaseUrl: 'http://www.dotnetnuke.com/DesktopModules/UserGroups/GroupLocatorService.asmx',
	GetRegionMethod:      '/GetRegions',
	SearchByRegionMethod: '/SearchByRegion',
	SearchByLocation:     '/SearchByLocation'
};

var viewTab = Ti.UI.createView({
	height: 45,
	width: 320,
	top: 0,
	left: 0
});
var viewTabPanel = Ti.UI.createView({
	bottom: 0,
	top: 45//,
	//backgroundColor: '#ff0'
});

viewContainer.add(viewTab);
viewContainer.add(viewTabPanel);

viewTab.add(searchTab);
//viewTab.add(favoriteTab);

viewTabPanel.add(searchPanel);
//viewTabPanel.add(favoritePanel);

Ti.include('searchbylocation.js');
Ti.include('searchbyregion.js');

var win = Ti.UI.currentWindow;
win.add(headerView);
win.add(viewContainer);
ShowSearch();

function selectDataRow(data, index){
	for (var i = 0; i < data.length; i++){
		data[i].selected = i==index ? true : false;
	}
};